package backend;

import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.apache.ibatis.session.SqlSession;
import domain.*;
import java.io.Reader;

public class Standalone_Driver {

	private static SqlSession session = null;
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		String myBatis_config = "resources/mybatis-config.xml";
		try {
			Reader config_reader = Resources.getResourceAsReader(myBatis_config);
			SqlSessionFactory sessionFactory = new SqlSessionFactoryBuilder().build(config_reader);
			session = sessionFactory.openSession();
		
			
		
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		finally {
			if (session != null) session.close();
		}
		
		
		
		
	}

}
